<include file="../Public/header" />
<script data-main="__PUBLIC__/admin/js/page/admin/site/sitemanager" src="__PUBLIC__/admin/js/lib/requirejs/require.js"></script>
<script type="text/javascript">
var apps = new Array()
</script>
</head>

<body>
  <div class="page">
    <div class="page-hd">
      <h1>网站列表</h1>
    </div>

    <div class="navbar">
      <ul class="nav">
        <li class="active"><a href="{:URL('admin/Site/siteManager')}">网站列表</a>
        </li>
        <li><a href="{:URL('admin/Site/addSite')}">添加网站</a>
        </li>
      </ul>
    </div>

    <div class="datas">
      <div class="datas-bd">
        <table class="table">
          <thead>
            <tr>
              <th style="width:15px">
                <input type="checkbox" class="toggle-all">
              </th>
              <th style="">{$Think.lang.apps}{$Think.lang.ID}</th>
              <th style="">{$Think.lang.appName}</th>
              <th style="">{$Think.lang.apps}{$Think.lang.url}</th>
              <th style="">{$Think.lang.communicationStatus}</th>
              <th style="">{$Think.lang.operating}</th>
            </tr>
          </thead>
          <tbody>
            <php>$ix=0;</php>
            <volist id="app" name="applist">
              <tr data-id="{$app.appid}">
                <td>
                  <input type="checkbox" class="toggle">
                </td>
                <td>{$app.appid}</td>
                <td>{$app.name}</td>
                <td><a href="{$app[url]}" target="_blank">{$app.url}</a>
                </td>
                <td>
                  <div id="status_{$app[appid]}"></div>
                  <script id="link_{$app[appid]}" testlink="{:URL('admin/Site/ping')}&url=<php>echo urlencode($app['url']);</php>&ip=<php>echo urlencode($app['ip']);</php>&appid={$app[appid]}"></script><script>apps[{$ix}] = '{$app[appid]}';</script>
                </td>
                <td>
                  <a href="{:URL('admin/Site/editApps',array('id'=>$app['appid']))}">{$Think.lang.editor}</a>
                  <if condition="$app.appid eq 1">
                    <else/>| <a href="javascript:;" class="A_del">{$Think.lang.delete}</a>
                  </if>
                </td>
              </tr>
              <php>$ix++;</php>
            </volist>
          </tbody>
        </table>
      </div>

      <div class="datas-ft">
        <div class="actions">
          <a href="{:URL('admin/Site/addSite')}" class="btn">{$Think.lang.add}</a>
          <a href="javascript:;" class="btn" id="J_del">{$Think.lang.delete}</a>
        </div>
      </div>

    </div>
  </div>
</body>

</html>
